#ifndef __SAVAGE_H__
#define __SAVAGE_H__

#include "Sprite.h"

#define  CLUB_ATTACKING			0x00000010
#define  ATTACKING_MISS     0x00000020
#define  ATTACKING_SUCCESS  0x00000040
#define  SHOCKED_BY_LIGHTNING	0x00000080

class Savage : public Sprite
{
public:
	Savage(Ogre::SceneManager * _sm , Ogre::Camera * _c)
		:Sprite(_sm, _c)
	{
		//for moving 
		mLinearSpeed = 2;

		//for attacking
		attackRange = 1;
		attackRange2 = attackRange * attackRange;
		attackTagPoint_club_rel = Ogre::Vector3(0,0,1.2f);
		attack_power_factor = 7.5f;

		//for being attacked by lightning
		shockTime_process = 0;
		originalTexture_name = "";
		shockedTexture_name = Ogre::String("yuanshiren01_black.tga");
		reserved_TextureUnitState = NULL;

		
	}
	virtual void update(Ogre::Real timeSinceLast);
	virtual void animationChanging(Ogre::Real timeSinceLast);

	virtual void _postload();

	//game logic speicified
	Ogre::Real attackRange2;
	Ogre::Real attackRange;
	Ogre::Vector3 attackTagPoint_club_rel;
	Ogre::Real attack_power_factor;

	Ogre::Real shockTime_process;
	Ogre::String originalTexture_name;
	Ogre::String shockedTexture_name;
	Ogre::TextureUnitState *reserved_TextureUnitState;
	void shockedByLightning(Ogre::Real shockTime);
};


#endif